package com.zz.yt.test.delegate.news;

import android.app.Activity;
import android.os.Bundle;

import androidx.annotation.Nullable;

import com.blankj.utilcode.util.GsonUtils;
import com.java.lib.gm.GmUtils;
import com.whf.android.jar.app.Latte;
import com.whf.android.jar.base.latte.BaseActivity;
import com.whf.android.jar.net.RestClient;
import com.whf.android.jar.net.callback.ISuccess;
import com.whf.android.jar.net.utils.RestClientUtils;
import com.whf.android.jar.util.log.LatteLogger;
import com.zz.yt.test.R;

import java.util.HashMap;
import java.util.Map;

/**
 * Company:中再云图技术有限公司
 *
 * @author qf
 * @version 2020/4/23
 */
public class LoadingActivity extends BaseActivity implements Runnable {


    @Override
    protected Object setLayout() {
        return R.layout.activity_gloading;
    }

    @Override
    public void onBindView(@Nullable Bundle savedInstanceState) {
        RestClient.builder()
                .url("https://www.baidu.com/")
                .success(LatteLogger::json)
                .build()
                .get();
        LatteLogger.i(" " + Latte.getAppGuide());

        RestClientUtils.create().inGet("https://www.baidu.com/", "18", new ISuccess() {
            @Override
            public void onSuccess(String response) {

            }
        });
        Map<String, Object> map = new HashMap<>();
        map.put("id", 152);
        map.put("name", "张三");
        String params = GsonUtils.toJson(map);
//        Map<String, String> gmMap = GmUtils.getGmSm(GsonUtils.toJson(params));
//        LatteLogger.json("国密", GsonUtils.toJson(gmMap));
//
//        RestClientUtils.create().inPost("https://www.baidu.com/", gmMap, new ISuccess() {
//            @Override
//            public void onSuccess(String response) {
//
//            }
//        });
    }

    @Override
    public void run() {

    }
}
